<?php
/**
 * Created by PhpStorm.
 * User: xuechunxuan
 * Date: 2018/10/22
 * Time: 18:46
 */
namespace app\index\model;

use think\Db;

class Sharehistory extends Base{
    public function __construct($data = [])
    {
       $this->setTableName("user_share_history");
    }

    /*
     * 根据pieId获取对应海报模版信息
     * */
    public function getPriceByPieId($pieId){
       return Db::name($this->getTableName())
            ->alias("a")
            ->join("seller_consume b","a.consume_id=b.id")
            ->field("b.id,b.is_show,app_id,price")
            ->where("a.pie_id='$pieId'")
            ->find();
    }
}